<template>
  <div class="person">
    
  </div>
</template>

<script lang="ts" setup name="Person">
  import {type PersonInter} from '@/types';
  //对单个对象进行规范：
  let person:PersonInter = {id:'bf32gu3vtu',name:'张三',age:18}

  //对数组进行规范：let personList:Array<PersonInter>
  let personList:Array<PersonInter> = [
    {id:'bf32gu3vtu',name:'张三',age:18},
    {id:'awgrrb12d',name:'陈守宝',age:22},
    {id:'nqccr3nr1',name:'陈财',age:20}
  ]
</script>
//scoped:局部样式：只在模板中的样式，只对当前组件有效
<style scoped>
  .person {
    background-color: skyblue;
    box-shadow: 0 0 10px;
    border-radius: 10px;
    padding: 20px;
  }
  button {
    margin: 0 5px;
  }
  li {
    font-size: 20px;
  }
</style>